package com.yy.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Transient;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/* 分类实体类 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "菜品实体类")
public class Category implements Serializable {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value = "id")
    private Long id;
    @ApiModelProperty(value = "类型   1 菜品分类 2 套餐分类")
    private Integer type;
    @ApiModelProperty(value = "分类名称")
    private String name;
    @ApiModelProperty(value = "顺序")
    private Integer sort;
    @ApiModelProperty(value = "状态")
    private Integer status;
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty("创建时间")
    private LocalDateTime createTime;
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty("更新时间")
    private LocalDateTime updateTime;
    @ApiModelProperty("创建人")
    private Long createUser;
    @ApiModelProperty("修改人")
    private Long  updateUser;

    //菜品列表
    @Transient
    private List<Dish> dishList;
    //套餐列表
    @Transient
    private List<Setmeal> setmealList;
}
